/*
 * $Id$
 */
package py.firefly;

import py.firefly.request.Request;
import py.firefly.request.Response;

import py.firefly.resolution.Resolution;

/**
 *
 * @author py
 */
public abstract class Before extends Interceptor {

    /**
     *
     * @param req
     * @param resp
     * @return
     */
    @Override
    public final Resolution handle(final Request req, final Response resp) {
        final Resolution r = before();
        return r != null ? r : _handler.handle(req, resp);
    }

    /**
     *
     */
    public abstract Resolution before();
}
